1 Climate change and temperature anomalies

If we wanted to study climate change, we can find data on the Combined Land-Surface Air and Sea-Surface Water Temperature Anomalies in the Northern Hemisphere at NASA’s Goddard Institute for Space Studies. The tabular data of temperature anomalies can be found here

To define temperature anomalies you need to have a reference, or base, period which NASA clearly states that it is the period between 1951-1980.

Run the code below to load the file:

weather <- 
  read_csv("https://data.giss.nasa.gov/gistemp/tabledata_v4/NH.Ts+dSST.csv", 
           skip = 1, 
           na = "***")

Notice that, when using this function, we added two options: skip and na.

  1. The skip=1 option is there as the real data table only starts in Row 2, so we need to skip one row.
  2. na = "***" option informs R how missing observations in the spreadsheet are coded. When looking at the spreadsheet, you can see that missing data is coded as "***". It is best to specify this here, as otherwise some of the data is not recognized as numeric data.

Once the data is loaded, notice that there is a object titled weather in the Environment panel. If you cannot see the panel (usually on the top-right), go to Tools > Global Options > Pane Layout and tick the checkbox next to Environment. Click on the weather object, and the dataframe will pop up on a seperate tab. Inspect the dataframe.

For each month and year, the dataframe shows the deviation of temperature from the normal (expected). Further the dataframe is in wide format.

You have two objectives in this section:

  1. Select the year and the twelve month variables from the weather dataset. We do not need the others (J-D, D-N, DJF, etc.) for this assignment. Hint: use select() function.

  2. Convert the dataframe from wide to ‘long’ format. Hint: use gather() or pivot_longer() function. Name the new dataframe as tidyweather, name the variable containing the name of the month as month, and the temperature deviation values as delta.

glimpse(weather)
## Rows: 142
## Columns: 19
## $ Year  <dbl> 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890…
## $ Jan   <dbl> -0.34, -0.30, 0.27, -0.57, -0.16, -1.00, -0.74, -1.08, -0.49, -0…
## $ Feb   <dbl> -0.50, -0.21, 0.22, -0.65, -0.10, -0.44, -0.83, -0.70, -0.61, 0.…
## $ Mar   <dbl> -0.22, -0.03, 0.02, -0.15, -0.64, -0.23, -0.72, -0.44, -0.64, -0…
## $ Apr   <dbl> -0.29, 0.01, -0.31, -0.30, -0.59, -0.48, -0.37, -0.38, -0.22, 0.…
## $ May   <dbl> -0.05, 0.04, -0.24, -0.25, -0.35, -0.58, -0.33, -0.25, -0.15, -0…
## $ Jun   <dbl> -0.15, -0.32, -0.29, -0.11, -0.41, -0.44, -0.37, -0.20, -0.03, -…
## $ Jul   <dbl> -0.17, 0.09, -0.27, -0.05, -0.44, -0.34, -0.15, -0.24, -0.01, -0…
## $ Aug   <dbl> -0.25, -0.03, -0.14, -0.22, -0.50, -0.41, -0.43, -0.54, -0.21, -…
## $ Sep   <dbl> -0.22, -0.25, -0.24, -0.33, -0.44, -0.40, -0.33, -0.21, -0.20, -…
## $ Oct   <dbl> -0.31, -0.42, -0.52, -0.16, -0.44, -0.37, -0.31, -0.49, -0.04, -…
## $ Nov   <dbl> -0.42, -0.36, -0.32, -0.44, -0.57, -0.38, -0.39, -0.27, -0.01, -…
## $ Dec   <dbl> -0.39, -0.22, -0.68, -0.14, -0.46, -0.11, -0.22, -0.43, -0.24, -…
## $ `J-D` <dbl> -0.28, -0.17, -0.21, -0.28, -0.43, -0.43, -0.43, -0.44, -0.24, -…
## $ `D-N` <dbl> NA, -0.18, -0.17, -0.33, -0.40, -0.46, -0.42, -0.42, -0.25, -0.1…
## $ DJF   <dbl> NA, -0.30, 0.09, -0.63, -0.14, -0.64, -0.56, -0.66, -0.51, -0.08…
## $ MAM   <dbl> -0.19, 0.01, -0.17, -0.23, -0.53, -0.43, -0.47, -0.36, -0.34, 0.…
## $ JJA   <dbl> -0.19, -0.09, -0.23, -0.12, -0.45, -0.40, -0.32, -0.33, -0.08, -…
## $ SON   <dbl> -0.32, -0.34, -0.36, -0.31, -0.48, -0.38, -0.35, -0.32, -0.08, -…
which(is.na(weather))
## [1] 1420 1562 1704 1846 1988 1989 2130 2131 2698
tidyweather <- weather %>% #selecting the necessary variables 
  select(Year,Jan, Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)%>%
  pivot_longer(cols=c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"), names_to = "month",values_to = "delta") #using pivot longer to convert the dataframe from wide to long 
tidyweather
## # A tibble: 1,704 × 3
##     Year month delta
##    <dbl> <chr> <dbl>
##  1  1880 Jan   -0.34
##  2  1880 Feb   -0.5 
##  3  1880 Mar   -0.22
##  4  1880 Apr   -0.29
##  5  1880 May   -0.05
##  6  1880 Jun   -0.15
##  7  1880 Jul   -0.17
##  8  1880 Aug   -0.25
##  9  1880 Sep   -0.22
## 10  1880 Oct   -0.31
## # … with 1,694 more rows

Inspect your dataframe. It should have three variables now, one each for

  1. year,
  2. month, and
  3. delta, or temperature deviation.

1.1 Plotting Information

Let us plot the data using a time-series scatter plot, and add a trendline. To do that, we first need to create a new variable called date in order to ensure that the delta values are plot chronologically.

In the following chunk of code, I used the eval=FALSE argument, which does not run a chunk of code; I did so that you can knit the document before tidying the data and creating a new dataframe tidyweather. When you actually want to run this code and knit your document, you must delete eval=FALSE, not just here but in all chunks were eval=FALSE appears.

tidyweather <- tidyweather %>% #selecting the datav
  mutate(date = ymd(paste(as.character(Year), month, "1")), #adding a new variable called "date" to the dataframe
         month = month(date, label=TRUE),
         year = year(date))

ggplot(tidyweather, aes(x=date, y = delta))+ #plotting delta chronologically
  geom_point()+
  geom_smooth(color="red") +
  theme_bw() +
  labs (
    title = "Weather Anomalies"
  )

Is the effect of increasing temperature more pronounced in some months? Use facet_wrap() to produce a seperate scatter plot for each month, again with a smoothing line. Your chart should human-readable labels; that is, each month should be labeled “Jan”, “Feb”, “Mar” (full or abbreviated month names are fine), not 1, 2, 3.

It is sometimes useful to group data into different time periods to study historical data. For example, we often refer to decades such as 1970s, 1980s, 1990s etc. to refer to a period of time. NASA calcuialtes a temperature anomaly, as difference form the base periof of 1951-1980. The code below creates a new data frame called comparison that groups data in five time periods: 1881-1920, 1921-1950, 1951-1980, 1981-2010 and 2011-present.

We remove data before 1800 and before using filter. Then, we use the mutate function to create a new variable interval which contains information on which period each observation belongs to. We can assign the different periods using case_when().

comparison <- tidyweather %>% 
  filter(Year>= 1881) %>%     #remove years prior to 1881
  #create new variable 'interval', and assign values based on criteria below:
  mutate(interval = case_when(
    Year %in% c(1881:1920) ~ "1881-1920",
    Year %in% c(1921:1950) ~ "1921-1950",
    Year %in% c(1951:1980) ~ "1951-1980",
    Year %in% c(1981:2010) ~ "1981-2010",
    TRUE ~ "2011-present"
  ))

Inspect the comparison dataframe by clicking on it in the Environment pane.

Now that we have the interval variable, we can create a density plot to study the distribution of monthly deviations (delta), grouped by the different time periods we are interested in. Set fill to interval to group and colour the data by different time periods.

ggplot(comparison, aes(x=delta, fill=interval))+
  geom_density(alpha=0.2) +   #density plot with tranparency set to 20%
  theme_bw() +                #theme
  labs (
    title = "Density Plot for Monthly Temperature Anomalies",
    y     = "Density"         #changing y-axis label to sentence case
  )

So far, we have been working with monthly anomalies. However, we might be interested in average annual anomalies. We can do this by using group_by() and summarise(), followed by a scatter plot to display the result.

#creating yearly averages
average_annual_anomaly <- tidyweather %>% 
  group_by(Year) %>%   #grouping data by Year
  
  # creating summaries for mean delta 
  # use `na.rm=TRUE` to eliminate NA (not available) values 
  summarise(annual_average_delta=mean(delta)) 

#plotting the data:
ggplot(average_annual_anomaly, aes(x=Year, y= annual_average_delta))+
  geom_point()+
  
  #Fit the best fit line, using LOESS method
  geom_smooth() +
  
  #change to theme_bw() to have white background + black frame around plot
  theme_bw() +
  labs (
    title = "Average Yearly Anomaly",
    y     = "Average Annual Delta"
  )                         

1.2 Confidence Interval for delta

NASA points out on their website that

A one-degree global change is significant because it takes a vast amount of heat to warm all the oceans, atmosphere, and land by that much. In the past, a one- to two-degree drop was all it took to plunge the Earth into the Little Ice Age.

Your task is to construct a confidence interval for the average annual delta since 2011, both using a formula and using a bootstrap simulation with the infer package. Recall that the dataframe comparison has already grouped temperature anomalies according to time intervals; we are only interested in what is happening between 2011-present.

comparison <- na.omit(comparison) #to eliminate the N/A starting from September 2021
comparison
## # A tibble: 1,688 × 6
##     Year month delta date        year interval 
##    <dbl> <ord> <dbl> <date>     <dbl> <chr>    
##  1  1881 Jan   -0.3  1881-01-01  1881 1881-1920
##  2  1881 Feb   -0.21 1881-02-01  1881 1881-1920
##  3  1881 Mar   -0.03 1881-03-01  1881 1881-1920
##  4  1881 Apr    0.01 1881-04-01  1881 1881-1920
##  5  1881 May    0.04 1881-05-01  1881 1881-1920
##  6  1881 Jun   -0.32 1881-06-01  1881 1881-1920
##  7  1881 Jul    0.09 1881-07-01  1881 1881-1920
##  8  1881 Aug   -0.03 1881-08-01  1881 1881-1920
##  9  1881 Sep   -0.25 1881-09-01  1881 1881-1920
## 10  1881 Oct   -0.42 1881-10-01  1881 1881-1920
## # … with 1,678 more rows
formula_ci <- comparison %>% 
  filter(interval=="2011-present")%>%   # choose the interval 2011-present
  summarise(mean_delta=mean(delta), #using summarise
            sd_delta=sd(delta),
            count=n(),
            t_critical=qt(0.975,count-1),
            se_delta=sd(delta)/sqrt(count),
            margin_of_error=t_critical*se_delta,
            delta_low=mean_delta-margin_of_error,
            delta_high=mean_delta+margin_of_error)%>%
  arrange(desc(mean_delta))
#print out formula_CI
formula_ci
## # A tibble: 1 × 8
##   mean_delta sd_delta count t_critical se_delta margin_of_error delta_low
##        <dbl>    <dbl> <int>      <dbl>    <dbl>           <dbl>     <dbl>
## 1       1.06    0.274   128       1.98   0.0243          0.0480      1.01
## # … with 1 more variable: delta_high <dbl>
# use the infer package to construct a 95% CI for delta

boot_ratings <- comparison %>%
  filter(interval == "2011-present") %>%
  specify(response = delta) %>%
  generate(reps = 1000, type = "bootstrap") %>%
  calculate(stat = "mean")

percentile_ci <- boot_ratings %>% 
  get_confidence_interval(level = 0.95, type = "percentile")
percentile_ci
## # A tibble: 1 × 2
##   lower_ci upper_ci
##      <dbl>    <dbl>
## 1     1.01     1.11

What is the data showing us? Please type your answer after (and outside!) this blockquote. You have to explain what you have done, and the interpretation of the result. One paragraph max, please!

The data highlights that there is a 95% probability that the temperature will deviate from the avergae and that the deviation will lie between 1.01 to 1.1, This highlights that there has been rise in temperature and the severity of the rise can differ.

2 Global warming and political views (GSS)

A 2010 Pew Research poll asked 1,306 Americans, “From what you’ve read and heard, is there solid evidence that the average temperature on earth has been getting warmer over the past few decades, or not?”

In this exercise we analyze whether there are any differences between the proportion of people who believe the earth is getting warmer and their political ideology. As usual, from the survey sample data, we will use the proportions to estimate values of population parameters. The file has 2253 observations on the following 2 variables:

  • party_or_ideology: a factor (categorical) variable with levels Conservative Republican, Liberal Democrat, Mod/Cons Democrat, Mod/Lib Republican
  • response : whether the respondent believes the earth is warming or not, or Don’t know/ refuse to answer
global_warming_pew <- read_csv(here::here("data", "global_warming_pew.csv"))

You will also notice that many responses should not be taken into consideration, like “No Answer”, “Don’t Know”, “Not applicable”, “Refused to Answer”.

global_warming_pew %>% #analyzing the number of responses that need to be omitted
  count(party_or_ideology, response)
## # A tibble: 12 × 3
##    party_or_ideology       response                          n
##    <chr>                   <chr>                         <int>
##  1 Conservative Republican Don't know / refuse to answer    45
##  2 Conservative Republican Earth is warming                248
##  3 Conservative Republican Not warming                     450
##  4 Liberal Democrat        Don't know / refuse to answer    23
##  5 Liberal Democrat        Earth is warming                405
##  6 Liberal Democrat        Not warming                      23
##  7 Mod/Cons Democrat       Don't know / refuse to answer    45
##  8 Mod/Cons Democrat       Earth is warming                563
##  9 Mod/Cons Democrat       Not warming                     158
## 10 Mod/Lib Republican      Don't know / refuse to answer    23
## 11 Mod/Lib Republican      Earth is warming                135
## 12 Mod/Lib Republican      Not warming                     135

We will be constructing three 95% confidence intervals to estimate population parameters, for the % who believe that Earth is warming, according to their party or ideology. You can create the CIs using the formulas by hand, or use prop.test()– just remember to exclude the Dont know / refuse to answer!

Does it appear that whether or not a respondent believes the earth is warming is independent of their party ideology?

Yes from the data it can be inferred that a respondents view about increase in global temperatures can be skewed as per the political and party ideology they share. This is evident as more than 50% of Conservative Republicans have voted that they don’t believe that temperatures are rising. On the other hand more than 50% of Liberal Democrats have voted that they believe that temperatures are rising. Democrats in each category (liberal, moderate or conservative) have a higher propensity to vote yes to rise in temperatures, whereas the opposite is true for Republicans. This highlights that an individual’s views about rising prices are driven by the political camp they are associated with i.e. Republican or Democratic rather than the degree of their affiliation i.e. liberal, moderate or conservative.

You may want to read on The challenging politics of climate change

global_warming2 <- global_warming_pew[!(global_warming_pew$response == "Don't know / refuse to answer"),] #removing the unwanted responses from the dataset
global_warming2
## # A tibble: 2,117 × 2
##    party_or_ideology       response        
##    <chr>                   <chr>           
##  1 Conservative Republican Earth is warming
##  2 Conservative Republican Earth is warming
##  3 Conservative Republican Earth is warming
##  4 Conservative Republican Earth is warming
##  5 Conservative Republican Earth is warming
##  6 Conservative Republican Earth is warming
##  7 Conservative Republican Earth is warming
##  8 Conservative Republican Earth is warming
##  9 Conservative Republican Earth is warming
## 10 Conservative Republican Earth is warming
## # … with 2,107 more rows
global_warming2 %>%
  count(party_or_ideology, response) #counting by repsonse type to ensure that the unwanted responses have been omitted
## # A tibble: 8 × 3
##   party_or_ideology       response             n
##   <chr>                   <chr>            <int>
## 1 Conservative Republican Earth is warming   248
## 2 Conservative Republican Not warming        450
## 3 Liberal Democrat        Earth is warming   405
## 4 Liberal Democrat        Not warming         23
## 5 Mod/Cons Democrat       Earth is warming   563
## 6 Mod/Cons Democrat       Not warming        158
## 7 Mod/Lib Republican      Earth is warming   135
## 8 Mod/Lib Republican      Not warming        135
prop.test(248,698)
## 
##  1-sample proportions test with continuity correction
## 
## data:  248 out of 698
## X-squared = 58, df = 1, p-value = 3e-14
## alternative hypothesis: true p is not equal to 0.5
## 95 percent confidence interval:
##  0.320 0.392
## sample estimates:
##     p 
## 0.355
prop.test(405,428)
## 
##  1-sample proportions test with continuity correction
## 
## data:  405 out of 428
## X-squared = 339, df = 1, p-value <2e-16
## alternative hypothesis: true p is not equal to 0.5
## 95 percent confidence interval:
##  0.919 0.965
## sample estimates:
##     p 
## 0.946
prop.test(563,721)
## 
##  1-sample proportions test with continuity correction
## 
## data:  563 out of 721
## X-squared = 226, df = 1, p-value <2e-16
## alternative hypothesis: true p is not equal to 0.5
## 95 percent confidence interval:
##  0.748 0.810
## sample estimates:
##     p 
## 0.781
prop.test(135,270)
## 
##  1-sample proportions test without continuity correction
## 
## data:  135 out of 270
## X-squared = 0, df = 1, p-value = 1
## alternative hypothesis: true p is not equal to 0.5
## 95 percent confidence interval:
##  0.441 0.559
## sample estimates:
##   p 
## 0.5

3 Biden’s Approval Margins

As we saw in class, fivethirtyeight.com has detailed data on all polls that track the president’s approval

# Import approval polls data directly off fivethirtyeight website
approval_pollist <- read_csv('https://projects.fivethirtyeight.com/biden-approval-data/approval_polllist.csv') 

glimpse(approval_pollist)
## Rows: 1,819
## Columns: 22
## $ president           <chr> "Joseph R. Biden Jr.", "Joseph R. Biden Jr.", "Jos…
## $ subgroup            <chr> "All polls", "All polls", "All polls", "All polls"…
## $ modeldate           <chr> "10/1/2021", "10/1/2021", "10/1/2021", "10/1/2021"…
## $ startdate           <chr> "1/19/2021", "1/19/2021", "1/20/2021", "1/20/2021"…
## $ enddate             <chr> "1/21/2021", "1/21/2021", "1/21/2021", "1/21/2021"…
## $ pollster            <chr> "Rasmussen Reports/Pulse Opinion Research", "Morni…
## $ grade               <chr> "B", "B", "B+", "B", "B-", "B", "B+", "B-", "B", "…
## $ samplesize          <dbl> 1500, 15000, 1516, 1993, 1115, 15000, 941, 1200, 1…
## $ population          <chr> "lv", "a", "a", "rv", "a", "a", "rv", "rv", "lv", …
## $ weight              <dbl> 0.3382, 0.2594, 1.2454, 0.0930, 1.1014, 0.2333, 1.…
## $ influence           <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ approve             <dbl> 48, 50, 45, 56, 55, 51, 63, 58, 48, 52, 53, 55, 48…
## $ disapprove          <dbl> 45, 28, 28, 31, 32, 28, 37, 32, 47, 29, 29, 33, 47…
## $ adjusted_approve    <dbl> 50.5, 48.6, 46.5, 54.6, 53.9, 49.6, 58.7, 56.9, 50…
## $ adjusted_disapprove <dbl> 38.8, 31.3, 28.4, 34.3, 32.9, 31.3, 38.0, 33.1, 40…
## $ multiversions       <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ tracking            <lgl> TRUE, TRUE, NA, NA, NA, TRUE, NA, NA, TRUE, TRUE, …
## $ url                 <chr> "https://www.rasmussenreports.com/public_content/p…
## $ poll_id             <dbl> 74247, 74272, 74327, 74246, 74248, 74273, 74256, 7…
## $ question_id         <dbl> 139395, 139491, 139570, 139394, 139404, 139492, 13…
## $ createddate         <chr> "1/22/2021", "1/28/2021", "2/2/2021", "1/22/2021",…
## $ timestamp           <chr> "10:23:09  1 Oct 2021", "10:23:09  1 Oct 2021", "1…
str(approval_pollist)
## spec_tbl_df [1,819 × 22] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
##  $ president          : chr [1:1819] "Joseph R. Biden Jr." "Joseph R. Biden Jr." "Joseph R. Biden Jr." "Joseph R. Biden Jr." ...
##  $ subgroup           : chr [1:1819] "All polls" "All polls" "All polls" "All polls" ...
##  $ modeldate          : chr [1:1819] "10/1/2021" "10/1/2021" "10/1/2021" "10/1/2021" ...
##  $ startdate          : chr [1:1819] "1/19/2021" "1/19/2021" "1/20/2021" "1/20/2021" ...
##  $ enddate            : chr [1:1819] "1/21/2021" "1/21/2021" "1/21/2021" "1/21/2021" ...
##  $ pollster           : chr [1:1819] "Rasmussen Reports/Pulse Opinion Research" "Morning Consult" "YouGov" "Morning Consult" ...
##  $ grade              : chr [1:1819] "B" "B" "B+" "B" ...
##  $ samplesize         : num [1:1819] 1500 15000 1516 1993 1115 ...
##  $ population         : chr [1:1819] "lv" "a" "a" "rv" ...
##  $ weight             : num [1:1819] 0.338 0.259 1.245 0.093 1.101 ...
##  $ influence          : num [1:1819] 0 0 0 0 0 0 0 0 0 0 ...
##  $ approve            : num [1:1819] 48 50 45 56 55 51 63 58 48 52 ...
##  $ disapprove         : num [1:1819] 45 28 28 31 32 28 37 32 47 29 ...
##  $ adjusted_approve   : num [1:1819] 50.5 48.6 46.5 54.6 53.9 ...
##  $ adjusted_disapprove: num [1:1819] 38.8 31.3 28.4 34.3 32.9 ...
##  $ multiversions      : chr [1:1819] NA NA NA NA ...
##  $ tracking           : logi [1:1819] TRUE TRUE NA NA NA TRUE ...
##  $ url                : chr [1:1819] "https://www.rasmussenreports.com/public_content/politics/biden_administration/biden_approval_index_history" "https://morningconsult.com/form/global-leader-approval/" "https://docs.cdn.yougov.com/u3h9dresbn/20210120_yahoo_coronavirus_toplines.pdf" "https://assets.morningconsult.com/wp-uploads/2021/01/21155806/210166_crosstabs_MC_WASHINGTON_RVs_v2.pdf" ...
##  $ poll_id            : num [1:1819] 74247 74272 74327 74246 74248 ...
##  $ question_id        : num [1:1819] 139395 139491 139570 139394 139404 ...
##  $ createddate        : chr [1:1819] "1/22/2021" "1/28/2021" "2/2/2021" "1/22/2021" ...
##  $ timestamp          : chr [1:1819] "10:23:09  1 Oct 2021" "10:23:09  1 Oct 2021" "10:23:09  1 Oct 2021" "10:23:09  1 Oct 2021" ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   president = col_character(),
##   ..   subgroup = col_character(),
##   ..   modeldate = col_character(),
##   ..   startdate = col_character(),
##   ..   enddate = col_character(),
##   ..   pollster = col_character(),
##   ..   grade = col_character(),
##   ..   samplesize = col_double(),
##   ..   population = col_character(),
##   ..   weight = col_double(),
##   ..   influence = col_double(),
##   ..   approve = col_double(),
##   ..   disapprove = col_double(),
##   ..   adjusted_approve = col_double(),
##   ..   adjusted_disapprove = col_double(),
##   ..   multiversions = col_character(),
##   ..   tracking = col_logical(),
##   ..   url = col_character(),
##   ..   poll_id = col_double(),
##   ..   question_id = col_double(),
##   ..   createddate = col_character(),
##   ..   timestamp = col_character()
##   .. )
##  - attr(*, "problems")=<externalptr>
# Use `lubridate` to fix dates, as they are given as characters.
approval_pollist1 <- approval_pollist%>% #converting the date from character to date 
  mutate(enddate2 = as.Date(approval_pollist$enddate, format =  "%m/%d/%Y"),
         week = isoweek(enddate2),
         net_approval_rate = approve-disapprove)

approval_pollist1 
## # A tibble: 1,819 × 25
##    president   subgroup modeldate startdate enddate pollster    grade samplesize
##    <chr>       <chr>    <chr>     <chr>     <chr>   <chr>       <chr>      <dbl>
##  1 Joseph R. … All pol… 10/1/2021 1/19/2021 1/21/2… Rasmussen … B           1500
##  2 Joseph R. … All pol… 10/1/2021 1/19/2021 1/21/2… Morning Co… B          15000
##  3 Joseph R. … All pol… 10/1/2021 1/20/2021 1/21/2… YouGov      B+          1516
##  4 Joseph R. … All pol… 10/1/2021 1/20/2021 1/21/2… Morning Co… B           1993
##  5 Joseph R. … All pol… 10/1/2021 1/20/2021 1/21/2… Ipsos       B-          1115
##  6 Joseph R. … All pol… 10/1/2021 1/20/2021 1/22/2… Morning Co… B          15000
##  7 Joseph R. … All pol… 10/1/2021 1/21/2021 1/22/2… HarrisX     B+           941
##  8 Joseph R. … All pol… 10/1/2021 1/21/2021 1/23/2… RMG Resear… B-          1200
##  9 Joseph R. … All pol… 10/1/2021 1/20/2021 1/24/2… Rasmussen … B           1500
## 10 Joseph R. … All pol… 10/1/2021 1/21/2021 1/23/2… Morning Co… B          15000
## # … with 1,809 more rows, and 17 more variables: population <chr>,
## #   weight <dbl>, influence <dbl>, approve <dbl>, disapprove <dbl>,
## #   adjusted_approve <dbl>, adjusted_disapprove <dbl>, multiversions <chr>,
## #   tracking <lgl>, url <chr>, poll_id <dbl>, question_id <dbl>,
## #   createddate <chr>, timestamp <chr>, enddate2 <date>, week <dbl>,
## #   net_approval_rate <dbl>
approval_ci <-  approval_pollist1%>% #creating a CI for approval rating on the end date 
  group_by(week)%>%
  summarise(mean_rate=mean(net_approval_rate),
            sd_rate=sd(net_approval_rate),
            count=n(),
            t_critical=qt(0.95,count-1),
            se_rate=sd(net_approval_rate)/sqrt(count),
            margin_of_error=t_critical*se_rate,
            rate_low=mean_rate-margin_of_error,
            rate_high=mean_rate+margin_of_error)%>%
  arrange(desc(mean_rate))

approval_ci %>%
  arrange(week)%>%
  select(week, mean_rate, rate_low, rate_high)
## # A tibble: 37 × 4
##     week mean_rate rate_low rate_high
##    <dbl>     <dbl>    <dbl>     <dbl>
##  1     3      20.2     17.7      22.8
##  2     4      18.1     16.1      20.1
##  3     5      16.2     14.3      18.1
##  4     6      16.7     14.7      18.6
##  5     7      16.1     14.4      17.9
##  6     8      13.8     12.1      15.5
##  7     9      12.9     11.1      14.7
##  8    10      14.3     12.6      16.1
##  9    11      16.1     13.9      18.2
## 10    12      14.0     12.1      15.9
## # … with 27 more rows

3.1 Create a plot

What I would like you to do is to calculate the average net approval rate (approve- disapprove) for each week since he got into office. I want you plot the net approval, along with its 95% confidence interval. There are various dates given for each poll, please use enddate, i.e., the date the poll ended.

ggplot(approval_ci, aes(x= week, y= mean_rate))+ #plotting the net approval rate along with the CI
  geom_line(colour="red", size=1/10)+
  geom_point(colour="red", size= 1)+
  geom_smooth(colour="blue")+
  geom_ribbon(aes(ymin=rate_low, ymax=rate_high), alpha = 0.1, colour="red")+
  geom_hline(yintercept=0, colour="orange", size=1)+
  labs(title = "Estimating Approval Margin(approve-disapprove) for Joe Biden",
  subtitle = "Weekly average of all polls",
  y = "Average Approval Margin(approve-disapprove)",
  x = "Week of the year")+
  facet_wrap(2021, scales = "free")+
  theme_minimal()

Also, please add an orange line at zero. Your plot should look like this:

3.2 Compare Confidence Intervals

Compare the confidence intervals for week 3 and week 25. Can you explain what’s going on? One paragraph would be enough. Mean and median rates decreased significantly from week 3 to week 25, with average approval rate decreased by almost 50%. Additionally, the confidence interval becomes slimmer (with lower SD and SE) due to the increased sample size over the whole polling period (count in week 3 and 25 is 28 and 43 respectively). That could imply that there might be a slight negative bias, as people tend to express their dissatisfaction stronger than their satisfaction, resulting in more people engaging in the polls when they are unsatisfied. A more reliable sample would have a more constant count of participants over the whole period (count almost doubles from week 3 to 25).

4 Challenge 1: Excess rentals in TfL bike sharing

Recall the TfL data on how many bikes were hired every single day. We can get the latest data by running the following

url <- "https://data.london.gov.uk/download/number-bicycle-hires/ac29363e-e0cb-47cc-a97a-e216d900a6b0/tfl-daily-cycle-hires.xlsx"

# Download TFL data to temporary file
httr::GET(url, write_disk(bike.temp <- tempfile(fileext = ".xlsx")))
## Response [https://airdrive-secure.s3-eu-west-1.amazonaws.com/london/dataset/number-bicycle-hires/2021-09-23T12%3A52%3A20/tfl-daily-cycle-hires.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJJDIMAIVZJDICKHA%2F20211003%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20211003T150916Z&X-Amz-Expires=300&X-Amz-Signature=9ce6a238812162683a108aaa804de849ddca42770b11fbea925ebe709c2dd0d2&X-Amz-SignedHeaders=host]
##   Date: 2021-10-03 15:09
##   Status: 200
##   Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
##   Size: 174 kB
## <ON DISK>  /var/folders/tx/74gc7yfd1xq27tc2q231vt2w0000gn/T//Rtmpz6qp4P/file83c1604a493.xlsx
# Use read_excel to read it as dataframe
bike0 <- read_excel(bike.temp,
                   sheet = "Data",
                   range = cell_cols("A:B"))

# change dates to get year, month, and week
bike <- bike0 %>% 
  clean_names() %>% 
  rename (bikes_hired = number_of_bicycle_hires) %>% 
  mutate (year = year(day),
          month = lubridate::month(day, label = TRUE),
          week = isoweek(day))

We can easily create a facet grid that plots bikes hired by month and year.

Look at May and Jun and compare 2020 with the previous years. What’s happening? Due to the COVID pandemic, most areas were locked down, restricting the outdoor activities for many citizens. Therefore, the demand for hired bikes (sample sizes) decreases for May 2020 and June 2020. However, we observed more extreme values (>= 60K) compared to the previous years. One possible explanation is that due to the social distancing rules, people who have mandatory need of commuting have to choose a safer transportation mean. Therefore, a large number of people are shifting from using public transport like railway to bikes. However, the challenge I want you to work on is to reproduce the following two graphs.

monthly_bike_total <- bike %>%
  filter(year >= 2016, year <= 2019) %>%
  group_by(month) %>%
  summarize(average_bikes = mean(bikes_hired))

monthly_bike_by_year <- bike %>%
  filter(year >= 2016, year <= 2021) %>%
  group_by(year, month) %>%
  summarize(average_bikes = mean(bikes_hired))

monthly_bike_by_year$total_average = monthly_bike_total$average_bikes[match(monthly_bike_by_year$month, monthly_bike_total$month)]

monthly_bike_by_year <- monthly_bike_by_year %>%
  mutate(upper_bar = ifelse(average_bikes > total_average, average_bikes - total_average, 0), lower_bar = ifelse(average_bikes < total_average, total_average - average_bikes, 0))

ggplot(monthly_bike_by_year, aes(x = month)) +
  geom_ribbon(aes(ymin = total_average, ymax = total_average + upper_bar), 
              fill = "green", alpha = 0.2, group = 1) +
  geom_ribbon(aes(ymin = total_average - lower_bar, ymax = total_average), 
              fill = "red", alpha = 0.2, group = 1) +
  geom_line(aes(y = average_bikes), color = "black",alpha=0.3, group = 1, size = 0.3) +
  geom_line(aes(y = total_average), color = "blue", group = 1, size = 0.5) +
  facet_wrap(~ year) +
  labs(title = "Monthly changes in TfL bike rentals",
       subtitle = "Change from monthly average shown in blue and calculated between 2016 and 2019",
       y = "Bike rentals",
       caption = "Source: TfL, London Data Store") +
  scale_x_discrete(guide = guide_axis(n.dodge=1)) +
  theme_minimal() +
  NULL

The second one looks at percentage changes from the expected level of weekly rentals. The two grey shaded rectangles correspond to Q2 (weeks 14-26) and Q4 (weeks 40-52).

weekly_bike_total <- bike %>%
  filter(year >= 2016, year <= 2019) %>%
  group_by(week) %>%
  summarize(average_bikes = mean(bikes_hired))

weekly_bike_by_year <- bike %>%
  filter(year >= 2016, year <= 2021) %>%
  group_by(year, week) %>%
  summarize(average_bikes = mean(bikes_hired))

weekly_bike_by_year$total_average = weekly_bike_total$average_bikes[match(weekly_bike_by_year$week, weekly_bike_total$week)]

weekly_bike_by_year <- weekly_bike_by_year %>%
  mutate(upper_pct = ifelse(average_bikes > total_average, ((average_bikes / total_average) - 1), 0), lower_pct = ifelse(average_bikes < total_average, ((total_average / average_bikes) - 1), 0))

ggplot(weekly_bike_by_year, aes(x = week)) +
  geom_ribbon(aes(ymin = 0, ymax = 0 + upper_pct), 
              fill = "green", alpha = 0.2, group = 1) +
  geom_ribbon(aes(ymin = 0 - lower_pct, ymax = 0), 
              fill = "red", alpha = 0.2, group = 1) +
  geom_line(aes(y = upper_pct), color = "black", alpha = 0.3, group = 1, size = 0.1) +
  geom_line(aes(y = -lower_pct), color = "black", alpha = 0.3, group = 1, size = 0.1) +
  facet_wrap(~ year) +
  labs(title = "Weekly changes in TfL bike rentals",
       subtitle = "Change from Weekly average shown in blue and calculated between 2016 and 2019",
       y = " ",
       caption = "Source: TfL, London Data Store") +
  geom_rug(sides="b",alpha = 1/2, color=ifelse(weekly_bike_by_year$average_bikes > weekly_bike_by_year$total_average, "green", "red"))+
  scale_y_continuous(labels = scales::percent)+
  annotate("rect", xmin = 14, xmax = 26, ymin = -1, ymax = 1, fill = "grey", alpha=0.3) +
  annotate("rect", xmin = 40, xmax = 52,ymin = -1, ymax = 1, fill = "grey",alpha=0.3) +
  theme_minimal() +
  scale_x_continuous(breaks=c(13,26,39,53))

  NULL
## NULL

For both of these graphs, you have to calculate the expected number of rentals per week or month between 2016-2019 and then, see how each week/month of 2020-2021 compares to the expected rentals. Think of the calculation excess_rentals = actual_rentals - expected_rentals.

Should you use the mean or the median to calculate your expected rentals? Why? We should use mean to calculate the expected rentals. Rentals are highly sensitive to seasonality; therefore, we would derive many outliers for excess rentals if we use median as the expected rentals. On the other hand, if we use mean to calculate the expected rentals, the difference can be diluted, which would make the graph more visible. In creating your plots, you may find these links useful:

5 Challenge 2: How has the CPI and its components changed over the last few years?

Remember how we used the tidyqant package to download CPI data. In this exercise, I would like you to do the following:

  1. You can find CPI components at FRED. You should adapt the code from German polls to scrape the FRED website and pull all of the CPI components into a vector. FIY, the list of components is the second table in that webpage.
  2. Once you have a vector of components, you can then pass it to tidyquant::tq_get(get = "economic.data", from = "2000-01-01") to get all data since January 1, 2000
  3. Since the data you download is an index with various starting dates, you need to calculate the yearly, or 12-month change. To do this you need to use the lag function, and specifically, year_change = value/lag(value, 12) - 1; this means you are comparing the current month’s value with that 12 months ago lag(value, 12).
  4. I want you to order components so the higher the yearly change, the earlier does that component appear.
  5. You should also make sure that the All Items CPI (CPIAUCSL) appears first.
  6. Add a geom_smooth() for each component to get a sense of the overall trend. 1 You may want to colour the points according to whether yearly change was positive or negative.

Having done this, you should get this graph.

CPI_components <- read.csv(file = '/Users/sanskritibajaj/Desktop/cpi_data.csv') #Load the dataset
CPI_components_table <- CPI_components %>% #change the format of date 
  mutate(date = lubridate::ymd(date))
CPI_components_table <- subset(CPI_components_table, date > "1999-12-31") #filter dates 
CPI_components_table <- CPI_components_table %>% mutate(year_change = value/lag(value,12) -1) #calculating year on year change 
CPI_components_table<- CPI_components_table %>%
                        arrange(year_change) 
CPI_components_table$Category = str_sub(CPI_components_table$title,47,-22) #extracting category name
p1 <- ggplot(CPI_components_table, aes(x=date, y = year_change))+ #plotting the yearly change in CPI for each category 
  scale_y_continuous(labels=scales::percent) + 
  facet_wrap(~Category)+
  geom_point(data = CPI_components_table,  aes(x=date, y = year_change,color = year_change<0),show.legend = FALSE)+
  geom_smooth() +
  theme_bw() +
  labs (
    title = "Yearly change of US CPI(All Items) and its components", x="Year", y="YoY % Change")
p2 <- p1 + theme(axis.text.x = element_text(angle = 90, hjust = 1))
p2

This graphs is fine, but perhaps has too many sub-categories. You can find the relative importance of components in the Consumer Price Indexes: U.S. city average, December 2020 here. Can you choose a smaller subset of the components you have and only list the major categories (Housing, Transportation, Food and beverages, Medical care, Education and communication, Recreation, and Apparel), sorted according to their relative importance?

Category_Labels = c("Housing","Transportation","Food and Beverages","Apparel","Medical Care", "Education and Communication","Recreation") #Listing the specific categories for which data is required 
CPI_components_subset_table <- subset(CPI_components_table, Category == Category_Labels) #filtering data for specific categories 
CPI_components_subset_table_sorted <- CPI_components_subset_table %>% #arranging the data as per categories and in dates 
       arrange(Category, date)

CategoryOrder = c("Food and Beverages", "Apparel","Medical Care","Housing","Education and Communication","Transportation","Recreation") #arranging the data as per the requirement of each category
CPI_components_sorted_ordered <- CPI_components_subset_table_sorted[ order(match(CPI_components_subset_table_sorted$Category, CategoryOrder)), ]

CPI_components_sorted_ordered
##     component       date value
## 83   CPIFABSL 2000-04-01   167
## 84   CPIFABSL 2001-07-01   174
## 85   CPIFABSL 2001-11-01   175
## 86   CPIFABSL 2002-01-01   176
## 87   CPIFABSL 2002-10-01   177
## 88   CPIFABSL 2003-05-01   179
## 89   CPIFABSL 2003-07-01   180
## 90   CPIFABSL 2003-12-01   184
## 91   CPIFABSL 2004-05-01   186
## 92   CPIFABSL 2004-10-01   188
## 93   CPIFABSL 2005-05-01   191
## 94   CPIFABSL 2005-10-01   192
## 95   CPIFABSL 2007-01-01   199
## 96   CPIFABSL 2008-03-01   210
## 97   CPIFABSL 2009-02-01   219
## 98   CPIFABSL 2010-05-01   220
## 99   CPIFABSL 2012-01-01   232
## 100  CPIFABSL 2012-03-01   233
## 101  CPIFABSL 2013-03-01   236
## 102  CPIFABSL 2013-07-01   237
## 103  CPIFABSL 2014-08-01   244
## 104  CPIFABSL 2015-02-01   246
## 105  CPIFABSL 2015-08-01   247
## 106  CPIFABSL 2015-10-01   248
## 107  CPIFABSL 2016-05-01   248
## 108  CPIFABSL 2016-09-01   248
## 109  CPIFABSL 2017-07-01   250
## 110  CPIFABSL 2018-02-01   252
## 111  CPIFABSL 2018-05-01   253
## 112  CPIFABSL 2018-08-01   254
## 113  CPIFABSL 2018-11-01   255
## 114  CPIFABSL 2018-12-01   256
## 115  CPIFABSL 2020-07-01   268
## 116  CPIFABSL 2021-02-01   271
## 1    CPIAPPSL 2000-05-01   130
## 2    CPIAPPSL 2001-07-01   127
## 3    CPIAPPSL 2001-12-01   125
## 4    CPIAPPSL 2002-12-01   123
## 5    CPIAPPSL 2003-03-01   121
## 6    CPIAPPSL 2003-09-01   121
## 7    CPIAPPSL 2004-12-01   120
## 8    CPIAPPSL 2005-02-01   120
## 9    CPIAPPSL 2005-04-01   120
## 10   CPIAPPSL 2006-05-01   120
## 11   CPIAPPSL 2007-11-01   119
## 12   CPIAPPSL 2009-01-01   118
## 13   CPIAPPSL 2010-03-01   120
## 14   CPIAPPSL 2010-08-01   119
## 15   CPIAPPSL 2011-06-01   122
## 16   CPIAPPSL 2012-10-01   127
## 17   CPIAPPSL 2013-07-01   128
## 18   CPIAPPSL 2013-08-01   127
## 19   CPIAPPSL 2013-11-01   127
## 20   CPIAPPSL 2014-02-01   127
## 21   CPIAPPSL 2014-11-01   127
## 22   CPIAPPSL 2015-02-01   126
## 23   CPIAPPSL 2015-06-01   126
## 24   CPIAPPSL 2015-10-01   125
## 25   CPIAPPSL 2015-11-01   126
## 26   CPIAPPSL 2016-02-01   126
## 27   CPIAPPSL 2016-10-01   127
## 28   CPIAPPSL 2016-11-01   127
## 29   CPIAPPSL 2017-02-01   126
## 30   CPIAPPSL 2017-03-01   127
## 31   CPIAPPSL 2017-08-01   125
## 32   CPIAPPSL 2017-09-01   126
## 33   CPIAPPSL 2019-10-01   122
## 34   CPIAPPSL 2020-01-01   123
## 35   CPIAPPSL 2020-08-01   117
## 36   CPIAPPSL 2020-12-01   118
## 37   CPIAPPSL 2021-02-01   119
## 38   CPIAPPSL 2021-06-01   122
## 39   CPIAPPSL 2021-08-01   122
## 165  CPIMEDSL 2000-07-01   261
## 166  CPIMEDSL 2001-04-01   270
## 167  CPIMEDSL 2002-06-01   285
## 168  CPIMEDSL 2002-08-01   287
## 169  CPIMEDSL 2003-08-01   298
## 170  CPIMEDSL 2004-05-01   309
## 171  CPIMEDSL 2004-08-01   312
## 172  CPIMEDSL 2005-01-01   317
## 173  CPIMEDSL 2005-04-01   321
## 174  CPIMEDSL 2005-07-01   324
## 175  CPIMEDSL 2007-06-01   350
## 176  CPIMEDSL 2008-01-01   360
## 177  CPIMEDSL 2008-02-01   361
## 178  CPIMEDSL 2008-06-01   364
## 179  CPIMEDSL 2008-07-01   364
## 180  CPIMEDSL 2010-04-01   387
## 181  CPIMEDSL 2011-05-01   399
## 182  CPIMEDSL 2011-06-01   399
## 183  CPIMEDSL 2011-07-01   401
## 184  CPIMEDSL 2013-02-01   422
## 185  CPIMEDSL 2013-08-01   427
## 186  CPIMEDSL 2013-10-01   429
## 187  CPIMEDSL 2014-01-01   430
## 188  CPIMEDSL 2014-06-01   435
## 189  CPIMEDSL 2014-07-01   436
## 190  CPIMEDSL 2014-08-01   436
## 191  CPIMEDSL 2016-03-01   458
## 192  CPIMEDSL 2017-05-01   473
## 193  CPIMEDSL 2017-11-01   478
## 194  CPIMEDSL 2018-03-01   483
## 195  CPIMEDSL 2018-06-01   486
## 196  CPIMEDSL 2018-09-01   485
## 197  CPIMEDSL 2019-11-01   508
## 198  CPIMEDSL 2020-08-01   524
## 199  CPIMEDSL 2020-09-01   523
## 117  CPIHOSSL 2000-03-01   168
## 118  CPIHOSSL 2000-07-01   170
## 119  CPIHOSSL 2001-08-01   177
## 120  CPIHOSSL 2001-09-01   177
## 121  CPIHOSSL 2001-12-01   178
## 122  CPIHOSSL 2002-04-01   180
## 123  CPIHOSSL 2002-08-01   181
## 124  CPIHOSSL 2002-11-01   182
## 125  CPIHOSSL 2003-09-01   186
## 126  CPIHOSSL 2003-11-01   186
## 127  CPIHOSSL 2004-01-01   187
## 128  CPIHOSSL 2004-05-01   189
## 129  CPIHOSSL 2005-03-01   194
## 130  CPIHOSSL 2005-05-01   195
## 131  CPIHOSSL 2005-10-01   199
## 132  CPIHOSSL 2005-12-01   200
## 133  CPIHOSSL 2006-09-01   205
## 134  CPIHOSSL 2006-12-01   206
## 135  CPIHOSSL 2007-01-01   207
## 136  CPIHOSSL 2007-03-01   208
## 137  CPIHOSSL 2007-07-01   210
## 138  CPIHOSSL 2007-08-01   210
## 139  CPIHOSSL 2009-02-01   218
## 140  CPIHOSSL 2009-06-01   217
## 141  CPIHOSSL 2009-10-01   217
## 142  CPIHOSSL 2010-03-01   216
## 143  CPIHOSSL 2010-12-01   217
## 144  CPIHOSSL 2011-04-01   218
## 145  CPIHOSSL 2012-01-01   221
## 146  CPIHOSSL 2012-09-01   223
## 147  CPIHOSSL 2012-11-01   225
## 148  CPIHOSSL 2013-10-01   229
## 149  CPIHOSSL 2013-11-01   229
## 150  CPIHOSSL 2013-12-01   230
## 151  CPIHOSSL 2014-02-01   231
## 152  CPIHOSSL 2014-04-01   232
## 153  CPIHOSSL 2015-02-01   236
## 154  CPIHOSSL 2015-03-01   237
## 155  CPIHOSSL 2017-01-01   248
## 156  CPIHOSSL 2017-02-01   249
## 157  CPIHOSSL 2017-05-01   250
## 158  CPIHOSSL 2018-10-01   260
## 159  CPIHOSSL 2019-06-01   266
## 160  CPIHOSSL 2020-06-01   271
## 161  CPIHOSSL 2020-10-01   273
## 162  CPIHOSSL 2020-12-01   274
## 163  CPIHOSSL 2021-01-01   274
## 164  CPIHOSSL 2021-07-01   281
## 40   CPIEDUSL 2000-02-01   102
## 41   CPIEDUSL 2000-05-01   102
## 42   CPIEDUSL 2002-08-01   109
## 43   CPIEDUSL 2002-12-01   109
## 44   CPIEDUSL 2003-11-01   110
## 45   CPIEDUSL 2004-01-01   111
## 46   CPIEDUSL 2004-03-01   111
## 47   CPIEDUSL 2004-05-01   111
## 48   CPIEDUSL 2004-07-01   112
## 49   CPIEDUSL 2005-06-01   114
## 50   CPIEDUSL 2005-12-01   115
## 51   CPIEDUSL 2008-05-01   123
## 52   CPIEDUSL 2008-10-01   125
## 53   CPIEDUSL 2008-11-01   125
## 54   CPIEDUSL 2008-12-01   126
## 55   CPIEDUSL 2009-09-01   128
## 56   CPIEDUSL 2010-02-01   129
## 57   CPIEDUSL 2010-05-01   130
## 58   CPIEDUSL 2010-10-01   130
## 59   CPIEDUSL 2010-12-01   130
## 60   CPIEDUSL 2011-05-01   131
## 61   CPIEDUSL 2011-07-01   131
## 62   CPIEDUSL 2011-08-01   132
## 63   CPIEDUSL 2012-08-01   134
## 64   CPIEDUSL 2012-09-01   134
## 65   CPIEDUSL 2013-10-01   136
## 66   CPIEDUSL 2014-06-01   138
## 67   CPIEDUSL 2014-08-01   138
## 68   CPIEDUSL 2014-12-01   137
## 69   CPIEDUSL 2016-05-01   139
## 70   CPIEDUSL 2016-07-01   139
## 71   CPIEDUSL 2016-08-01   139
## 72   CPIEDUSL 2016-10-01   139
## 73   CPIEDUSL 2016-11-01   139
## 74   CPIEDUSL 2018-03-01   136
## 75   CPIEDUSL 2018-05-01   137
## 76   CPIEDUSL 2019-03-01   137
## 77   CPIEDUSL 2019-10-01   138
## 78   CPIEDUSL 2019-12-01   139
## 79   CPIEDUSL 2020-04-01   140
## 80   CPIEDUSL 2021-03-01   141
## 81   CPIEDUSL 2021-07-01   143
## 82   CPIEDUSL 2021-08-01   143
## 242  CPITRNSL 2000-10-01   155
## 243  CPITRNSL 2000-12-01   155
## 244  CPITRNSL 2002-01-01   149
## 245  CPITRNSL 2002-07-01   153
## 246  CPITRNSL 2003-12-01   157
## 247  CPITRNSL 2005-03-01   169
## 248  CPITRNSL 2005-04-01   170
## 249  CPITRNSL 2006-02-01   178
## 250  CPITRNSL 2006-03-01   178
## 251  CPITRNSL 2008-01-01   194
## 252  CPITRNSL 2008-02-01   195
## 253  CPITRNSL 2008-10-01   196
## 254  CPITRNSL 2008-11-01   176
## 255  CPITRNSL 2009-04-01   170
## 256  CPITRNSL 2010-03-01   191
## 257  CPITRNSL 2010-08-01   192
## 258  CPITRNSL 2010-10-01   197
## 259  CPITRNSL 2011-01-01   204
## 260  CPITRNSL 2012-03-01   218
## 261  CPITRNSL 2012-09-01   222
## 262  CPITRNSL 2013-03-01   219
## 263  CPITRNSL 2014-05-01   218
## 264  CPITRNSL 2015-06-01   204
## 265  CPITRNSL 2016-01-01   193
## 266  CPITRNSL 2016-02-01   189
## 267  CPITRNSL 2016-08-01   194
## 268  CPITRNSL 2019-02-01   206
## 269  CPITRNSL 2019-06-01   210
## 270  CPITRNSL 2019-09-01   209
## 271  CPITRNSL 2020-02-01   209
## 272  CPITRNSL 2020-07-01   198
## 273  CPITRNSL 2020-11-01   205
## 274  CPITRNSL 2021-02-01   211
## 200  CPIRECSL 2000-12-01   104
## 201  CPIRECSL 2001-04-01   105
## 202  CPIRECSL 2001-06-01   105
## 203  CPIRECSL 2002-02-01   106
## 204  CPIRECSL 2002-04-01   106
## 205  CPIRECSL 2002-07-01   106
## 206  CPIRECSL 2002-09-01   106
## 207  CPIRECSL 2002-10-01   106
## 208  CPIRECSL 2003-01-01   107
## 209  CPIRECSL 2003-12-01   108
## 210  CPIRECSL 2004-10-01   109
## 211  CPIRECSL 2005-01-01   109
## 212  CPIRECSL 2005-09-01   110
## 213  CPIRECSL 2006-08-01   111
## 214  CPIRECSL 2006-12-01   111
## 215  CPIRECSL 2008-03-01   113
## 216  CPIRECSL 2008-07-01   113
## 217  CPIRECSL 2008-11-01   114
## 218  CPIRECSL 2008-12-01   114
## 219  CPIRECSL 2009-01-01   114
## 220  CPIRECSL 2009-05-01   114
## 221  CPIRECSL 2009-12-01   114
## 222  CPIRECSL 2010-06-01   114
## 223  CPIRECSL 2011-05-01   113
## 224  CPIRECSL 2011-09-01   113
## 225  CPIRECSL 2011-12-01   114
## 226  CPIRECSL 2012-10-01   115
## 227  CPIRECSL 2012-12-01   115
## 228  CPIRECSL 2014-11-01   115
## 229  CPIRECSL 2015-02-01   115
## 230  CPIRECSL 2015-09-01   116
## 231  CPIRECSL 2015-12-01   116
## 232  CPIRECSL 2016-05-01   117
## 233  CPIRECSL 2016-10-01   117
## 234  CPIRECSL 2017-01-01   117
## 235  CPIRECSL 2017-03-01   118
## 236  CPIRECSL 2017-09-01   119
## 237  CPIRECSL 2018-04-01   119
## 238  CPIRECSL 2018-05-01   119
## 239  CPIRECSL 2020-02-01   122
## 240  CPIRECSL 2020-04-01   122
## 241  CPIRECSL 2021-05-01   125
##                                                                                              title
## 83           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 84           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 85           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 86           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 87           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 88           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 89           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 90           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 91           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 92           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 93           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 94           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 95           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 96           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 97           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 98           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 99           Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 100          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 101          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 102          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 103          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 104          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 105          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 106          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 107          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 108          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 109          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 110          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 111          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 112          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 113          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 114          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 115          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 116          Consumer Price Index for All Urban Consumers: Food and Beverages in U.S. City Average
## 1                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 2                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 3                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 4                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 5                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 6                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 7                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 8                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 9                       Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 10                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 11                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 12                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 13                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 14                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 15                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 16                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 17                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 18                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 19                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 20                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 21                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 22                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 23                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 24                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 25                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 26                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 27                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 28                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 29                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 30                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 31                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 32                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 33                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 34                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 35                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 36                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 37                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 38                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 39                      Consumer Price Index for All Urban Consumers: Apparel in U.S. City Average
## 165                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 166                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 167                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 168                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 169                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 170                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 171                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 172                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 173                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 174                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 175                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 176                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 177                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 178                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 179                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 180                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 181                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 182                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 183                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 184                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 185                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 186                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 187                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 188                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 189                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 190                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 191                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 192                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 193                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 194                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 195                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 196                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 197                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 198                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 199                Consumer Price Index for All Urban Consumers: Medical Care in U.S. City Average
## 117                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 118                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 119                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 120                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 121                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 122                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 123                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 124                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 125                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 126                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 127                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 128                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 129                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 130                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 131                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 132                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 133                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 134                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 135                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 136                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 137                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 138                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 139                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 140                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 141                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 142                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 143                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 144                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 145                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 146                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 147                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 148                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 149                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 150                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 151                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 152                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 153                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 154                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 155                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 156                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 157                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 158                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 159                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 160                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 161                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 162                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 163                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 164                     Consumer Price Index for All Urban Consumers: Housing in U.S. City Average
## 40  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 41  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 42  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 43  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 44  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 45  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 46  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 47  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 48  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 49  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 50  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 51  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 52  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 53  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 54  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 55  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 56  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 57  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 58  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 59  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 60  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 61  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 62  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 63  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 64  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 65  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 66  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 67  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 68  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 69  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 70  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 71  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 72  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 73  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 74  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 75  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 76  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 77  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 78  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 79  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 80  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 81  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 82  Consumer Price Index for All Urban Consumers: Education and Communication in U.S. City Average
## 242              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 243              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 244              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 245              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 246              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 247              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 248              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 249              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 250              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 251              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 252              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 253              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 254              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 255              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 256              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 257              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 258              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 259              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 260              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 261              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 262              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 263              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 264              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 265              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 266              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 267              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 268              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 269              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 270              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 271              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 272              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 273              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 274              Consumer Price Index for All Urban Consumers: Transportation in U.S. City Average
## 200                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 201                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 202                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 203                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 204                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 205                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 206                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 207                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 208                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 209                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 210                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 211                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 212                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 213                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 214                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 215                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 216                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 217                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 218                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 219                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 220                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 221                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 222                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 223                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 224                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 225                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 226                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 227                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 228                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 229                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 230                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 231                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 232                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 233                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 234                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 235                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 236                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 237                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 238                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 239                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 240                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
## 241                  Consumer Price Index for All Urban Consumers: Recreation in U.S. City Average
##     vintage_date               units freq seas_adj  updated year_change
## 83       Current Index 1982-1984=100    M       SA 14-09-21   -0.275127
## 84       Current Index 1982-1984=100    M       SA 14-09-21    0.031398
## 85       Current Index 1982-1984=100    M       SA 14-09-21    0.033589
## 86       Current Index 1982-1984=100    M       SA 14-09-21    0.028672
## 87       Current Index 1982-1984=100    M       SA 14-09-21    0.009698
## 88       Current Index 1982-1984=100    M       SA 14-09-21    0.017007
## 89       Current Index 1982-1984=100    M       SA 14-09-21    0.020939
## 90       Current Index 1982-1984=100    M       SA 14-09-21    0.035453
## 91       Current Index 1982-1984=100    M       SA 14-09-21    0.039576
## 92       Current Index 1982-1984=100    M       SA 14-09-21    0.033480
## 93       Current Index 1982-1984=100    M       SA 14-09-21    0.024129
## 94       Current Index 1982-1984=100    M       SA 14-09-21    0.021774
## 95       Current Index 1982-1984=100    M       SA 14-09-21    0.024281
## 96       Current Index 1982-1984=100    M       SA 14-09-21    0.043524
## 97       Current Index 1982-1984=100    M       SA 14-09-21    0.047207
## 98       Current Index 1982-1984=100    M       SA 14-09-21    0.007328
## 99       Current Index 1982-1984=100    M       SA 14-09-21    0.042185
## 100      Current Index 1982-1984=100    M       SA 14-09-21    0.031797
## 101      Current Index 1982-1984=100    M       SA 14-09-21    0.015604
## 102      Current Index 1982-1984=100    M       SA 14-09-21    0.014464
## 103      Current Index 1982-1984=100    M       SA 14-09-21    0.025686
## 104      Current Index 1982-1984=100    M       SA 14-09-21    0.028460
## 105      Current Index 1982-1984=100    M       SA 14-09-21    0.015564
## 106      Current Index 1982-1984=100    M       SA 14-09-21    0.015493
## 107      Current Index 1982-1984=100    M       SA 14-09-21    0.006869
## 108      Current Index 1982-1984=100    M       SA 14-09-21   -0.001839
## 109      Current Index 1982-1984=100    M       SA 14-09-21    0.010614
## 110      Current Index 1982-1984=100    M       SA 14-09-21    0.014160
## 111      Current Index 1982-1984=100    M       SA 14-09-21    0.012095
## 112      Current Index 1982-1984=100    M       SA 14-09-21    0.014246
## 113      Current Index 1982-1984=100    M       SA 14-09-21    0.014503
## 114      Current Index 1982-1984=100    M       SA 14-09-21    0.016105
## 115      Current Index 1982-1984=100    M       SA 14-09-21    0.038950
## 116      Current Index 1982-1984=100    M       SA 14-09-21    0.035163
## 1        Current Index 1982-1984=100    M       SA 14-09-21   -0.505398
## 2        Current Index 1982-1984=100    M       SA 14-09-21   -0.012413
## 3        Current Index 1982-1984=100    M       SA 14-09-21   -0.032533
## 4        Current Index 1982-1984=100    M       SA 14-09-21   -0.017614
## 5        Current Index 1982-1984=100    M       SA 14-09-21   -0.036712
## 6        Current Index 1982-1984=100    M       SA 14-09-21   -0.020259
## 7        Current Index 1982-1984=100    M       SA 14-09-21   -0.003328
## 8        Current Index 1982-1984=100    M       SA 14-09-21   -0.000833
## 9        Current Index 1982-1984=100    M       SA 14-09-21   -0.005804
## 10       Current Index 1982-1984=100    M       SA 14-09-21    0.000000
## 11       Current Index 1982-1984=100    M       SA 14-09-21   -0.005553
## 12       Current Index 1982-1984=100    M       SA 14-09-21   -0.012316
## 13       Current Index 1982-1984=100    M       SA 14-09-21   -0.001188
## 14       Current Index 1982-1984=100    M       SA 14-09-21   -0.010612
## 15       Current Index 1982-1984=100    M       SA 14-09-21    0.017446
## 16       Current Index 1982-1984=100    M       SA 14-09-21    0.028406
## 17       Current Index 1982-1984=100    M       SA 14-09-21    0.013578
## 18       Current Index 1982-1984=100    M       SA 14-09-21    0.016588
## 19       Current Index 1982-1984=100    M       SA 14-09-21    0.001116
## 20       Current Index 1982-1984=100    M       SA 14-09-21   -0.006673
## 21       Current Index 1982-1984=100    M       SA 14-09-21   -0.000620
## 22       Current Index 1982-1984=100    M       SA 14-09-21   -0.010363
## 23       Current Index 1982-1984=100    M       SA 14-09-21   -0.019315
## 24       Current Index 1982-1984=100    M       SA 14-09-21   -0.019083
## 25       Current Index 1982-1984=100    M       SA 14-09-21   -0.012023
## 26       Current Index 1982-1984=100    M       SA 14-09-21   -0.000492
## 27       Current Index 1982-1984=100    M       SA 14-09-21    0.009559
## 28       Current Index 1982-1984=100    M       SA 14-09-21    0.007007
## 29       Current Index 1982-1984=100    M       SA 14-09-21    0.000953
## 30       Current Index 1982-1984=100    M       SA 14-09-21    0.006063
## 31       Current Index 1982-1984=100    M       SA 14-09-21   -0.006413
## 32       Current Index 1982-1984=100    M       SA 14-09-21   -0.002462
## 33       Current Index 1982-1984=100    M       SA 14-09-21   -0.022319
## 34       Current Index 1982-1984=100    M       SA 14-09-21   -0.014131
## 35       Current Index 1982-1984=100    M       SA 14-09-21   -0.059704
## 36       Current Index 1982-1984=100    M       SA 14-09-21   -0.040986
## 37       Current Index 1982-1984=100    M       SA 14-09-21   -0.035683
## 38       Current Index 1982-1984=100    M       SA 14-09-21    0.048622
## 39       Current Index 1982-1984=100    M       SA 14-09-21    0.041963
## 165      Current Index 1982-1984=100    M       SA 14-09-21    0.846746
## 166      Current Index 1982-1984=100    M       SA 14-09-21    0.046440
## 167      Current Index 1982-1984=100    M       SA 14-09-21    0.044787
## 168      Current Index 1982-1984=100    M       SA 14-09-21    0.047029
## 169      Current Index 1982-1984=100    M       SA 14-09-21    0.038649
## 170      Current Index 1982-1984=100    M       SA 14-09-21    0.045393
## 171      Current Index 1982-1984=100    M       SA 14-09-21    0.045256
## 172      Current Index 1982-1984=100    M       SA 14-09-21    0.043120
## 173      Current Index 1982-1984=100    M       SA 14-09-21    0.041910
## 174      Current Index 1982-1984=100    M       SA 14-09-21    0.042793
## 175      Current Index 1982-1984=100    M       SA 14-09-21    0.040217
## 176      Current Index 1982-1984=100    M       SA 14-09-21    0.049142
## 177      Current Index 1982-1984=100    M       SA 14-09-21    0.044592
## 178      Current Index 1982-1984=100    M       SA 14-09-21    0.040508
## 179      Current Index 1982-1984=100    M       SA 14-09-21    0.035361
## 180      Current Index 1982-1984=100    M       SA 14-09-21    0.036218
## 181      Current Index 1982-1984=100    M       SA 14-09-21    0.030037
## 182      Current Index 1982-1984=100    M       SA 14-09-21    0.028924
## 183      Current Index 1982-1984=100    M       SA 14-09-21    0.031990
## 184      Current Index 1982-1984=100    M       SA 14-09-21    0.031087
## 185      Current Index 1982-1984=100    M       SA 14-09-21    0.023022
## 186      Current Index 1982-1984=100    M       SA 14-09-21    0.022707
## 187      Current Index 1982-1984=100    M       SA 14-09-21    0.021075
## 188      Current Index 1982-1984=100    M       SA 14-09-21    0.025693
## 189      Current Index 1982-1984=100    M       SA 14-09-21    0.025543
## 190      Current Index 1982-1984=100    M       SA 14-09-21    0.020772
## 191      Current Index 1982-1984=100    M       SA 14-09-21    0.033368
## 192      Current Index 1982-1984=100    M       SA 14-09-21    0.026939
## 193      Current Index 1982-1984=100    M       SA 14-09-21    0.016626
## 194      Current Index 1982-1984=100    M       SA 14-09-21    0.019810
## 195      Current Index 1982-1984=100    M       SA 14-09-21    0.024638
## 196      Current Index 1982-1984=100    M       SA 14-09-21    0.017229
## 197      Current Index 1982-1984=100    M       SA 14-09-21    0.042434
## 198      Current Index 1982-1984=100    M       SA 14-09-21    0.044675
## 199      Current Index 1982-1984=100    M       SA 14-09-21    0.042107
## 117      Current Index 1982-1984=100    M       SA 14-09-21    0.313162
## 118      Current Index 1982-1984=100    M       SA 14-09-21    0.326888
## 119      Current Index 1982-1984=100    M       SA 14-09-21    0.040541
## 120      Current Index 1982-1984=100    M       SA 14-09-21    0.034483
## 121      Current Index 1982-1984=100    M       SA 14-09-21    0.029514
## 122      Current Index 1982-1984=100    M       SA 14-09-21    0.023375
## 123      Current Index 1982-1984=100    M       SA 14-09-21    0.020327
## 124      Current Index 1982-1984=100    M       SA 14-09-21    0.025352
## 125      Current Index 1982-1984=100    M       SA 14-09-21    0.024296
## 126      Current Index 1982-1984=100    M       SA 14-09-21    0.021978
## 127      Current Index 1982-1984=100    M       SA 14-09-21    0.021870
## 128      Current Index 1982-1984=100    M       SA 14-09-21    0.023294
## 129      Current Index 1982-1984=100    M       SA 14-09-21    0.033031
## 130      Current Index 1982-1984=100    M       SA 14-09-21    0.030175
## 131      Current Index 1982-1984=100    M       SA 14-09-21    0.039226
## 132      Current Index 1982-1984=100    M       SA 14-09-21    0.039042
## 133      Current Index 1982-1984=100    M       SA 14-09-21    0.040142
## 134      Current Index 1982-1984=100    M       SA 14-09-21    0.033066
## 135      Current Index 1982-1984=100    M       SA 14-09-21    0.031362
## 136      Current Index 1982-1984=100    M       SA 14-09-21    0.034389
## 137      Current Index 1982-1984=100    M       SA 14-09-21    0.031185
## 138      Current Index 1982-1984=100    M       SA 14-09-21    0.028927
## 139      Current Index 1982-1984=100    M       SA 14-09-21    0.019618
## 140      Current Index 1982-1984=100    M       SA 14-09-21    0.000420
## 141      Current Index 1982-1984=100    M       SA 14-09-21   -0.003505
## 142      Current Index 1982-1984=100    M       SA 14-09-21   -0.006033
## 143      Current Index 1982-1984=100    M       SA 14-09-21   -0.000350
## 144      Current Index 1982-1984=100    M       SA 14-09-21    0.009690
## 145      Current Index 1982-1984=100    M       SA 14-09-21    0.018589
## 146      Current Index 1982-1984=100    M       SA 14-09-21    0.015040
## 147      Current Index 1982-1984=100    M       SA 14-09-21    0.017305
## 148      Current Index 1982-1984=100    M       SA 14-09-21    0.020697
## 149      Current Index 1982-1984=100    M       SA 14-09-21    0.020556
## 150      Current Index 1982-1984=100    M       SA 14-09-21    0.021650
## 151      Current Index 1982-1984=100    M       SA 14-09-21    0.024399
## 152      Current Index 1982-1984=100    M       SA 14-09-21    0.025254
## 153      Current Index 1982-1984=100    M       SA 14-09-21    0.022139
## 154      Current Index 1982-1984=100    M       SA 14-09-21    0.019313
## 155      Current Index 1982-1984=100    M       SA 14-09-21    0.031150
## 156      Current Index 1982-1984=100    M       SA 14-09-21    0.031685
## 157      Current Index 1982-1984=100    M       SA 14-09-21    0.031071
## 158      Current Index 1982-1984=100    M       SA 14-09-21    0.028187
## 159      Current Index 1982-1984=100    M       SA 14-09-21    0.030262
## 160      Current Index 1982-1984=100    M       SA 14-09-21    0.020485
## 161      Current Index 1982-1984=100    M       SA 14-09-21    0.019402
## 162      Current Index 1982-1984=100    M       SA 14-09-21    0.020137
## 163      Current Index 1982-1984=100    M       SA 14-09-21    0.017897
## 164      Current Index 1982-1984=100    M       SA 14-09-21    0.033399
## 40       Current  Index Dec 1997=100    M       SA 14-09-21    0.044797
## 41       Current  Index Dec 1997=100    M       SA 14-09-21    0.004211
## 42       Current  Index Dec 1997=100    M       SA 14-09-21    0.029301
## 43       Current  Index Dec 1997=100    M       SA 14-09-21    0.021556
## 44       Current  Index Dec 1997=100    M       SA 14-09-21    0.013787
## 45       Current  Index Dec 1997=100    M       SA 14-09-21    0.012785
## 46       Current  Index Dec 1997=100    M       SA 14-09-21    0.015511
## 47       Current  Index Dec 1997=100    M       SA 14-09-21    0.017383
## 48       Current  Index Dec 1997=100    M       SA 14-09-21    0.018248
## 49       Current  Index Dec 1997=100    M       SA 14-09-21    0.017937
## 50       Current  Index Dec 1997=100    M       SA 14-09-21    0.024043
## 51       Current  Index Dec 1997=100    M       SA 14-09-21    0.029437
## 52       Current  Index Dec 1997=100    M       SA 14-09-21    0.034602
## 53       Current  Index Dec 1997=100    M       SA 14-09-21    0.036569
## 54       Current  Index Dec 1997=100    M       SA 14-09-21    0.036729
## 55       Current  Index Dec 1997=100    M       SA 14-09-21    0.028339
## 56       Current  Index Dec 1997=100    M       SA 14-09-21    0.023030
## 57       Current  Index Dec 1997=100    M       SA 14-09-21    0.021617
## 58       Current  Index Dec 1997=100    M       SA 14-09-21    0.015144
## 59       Current  Index Dec 1997=100    M       SA 14-09-21    0.013475
## 60       Current  Index Dec 1997=100    M       SA 14-09-21    0.009917
## 61       Current  Index Dec 1997=100    M       SA 14-09-21    0.009192
## 62       Current  Index Dec 1997=100    M       SA 14-09-21    0.011198
## 63       Current  Index Dec 1997=100    M       SA 14-09-21    0.015659
## 64       Current  Index Dec 1997=100    M       SA 14-09-21    0.016183
## 65       Current  Index Dec 1997=100    M       SA 14-09-21    0.015627
## 66       Current  Index Dec 1997=100    M       SA 14-09-21    0.015386
## 67       Current  Index Dec 1997=100    M       SA 14-09-21    0.015616
## 68       Current  Index Dec 1997=100    M       SA 14-09-21    0.003800
## 69       Current  Index Dec 1997=100    M       SA 14-09-21    0.011351
## 70       Current  Index Dec 1997=100    M       SA 14-09-21    0.008391
## 71       Current  Index Dec 1997=100    M       SA 14-09-21    0.007545
## 72       Current  Index Dec 1997=100    M       SA 14-09-21   -0.002131
## 73       Current  Index Dec 1997=100    M       SA 14-09-21   -0.003031
## 74       Current  Index Dec 1997=100    M       SA 14-09-21   -0.001408
## 75       Current  Index Dec 1997=100    M       SA 14-09-21    0.005035
## 76       Current  Index Dec 1997=100    M       SA 14-09-21    0.007747
## 77       Current  Index Dec 1997=100    M       SA 14-09-21    0.005637
## 78       Current  Index Dec 1997=100    M       SA 14-09-21    0.013745
## 79       Current  Index Dec 1997=100    M       SA 14-09-21    0.015943
## 80       Current  Index Dec 1997=100    M       SA 14-09-21    0.014991
## 81       Current  Index Dec 1997=100    M       SA 14-09-21    0.011334
## 82       Current  Index Dec 1997=100    M       SA 14-09-21    0.011992
## 242      Current Index 1982-1984=100    M       SA 14-09-21   -0.335832
## 243      Current Index 1982-1984=100    M       SA 14-09-21   -0.337548
## 244      Current Index 1982-1984=100    M       SA 14-09-21   -0.039254
## 245      Current Index 1982-1984=100    M       SA 14-09-21   -0.004545
## 246      Current Index 1982-1984=100    M       SA 14-09-21    0.013522
## 247      Current Index 1982-1984=100    M       SA 14-09-21    0.052239
## 248      Current Index 1982-1984=100    M       SA 14-09-21    0.065707
## 249      Current Index 1982-1984=100    M       SA 14-09-21    0.059976
## 250      Current Index 1982-1984=100    M       SA 14-09-21    0.052600
## 251      Current Index 1982-1984=100    M       SA 14-09-21    0.096250
## 252      Current Index 1982-1984=100    M       SA 14-09-21    0.096817
## 253      Current Index 1982-1984=100    M       SA 14-09-21    0.046469
## 254      Current Index 1982-1984=100    M       SA 14-09-21   -0.087275
## 255      Current Index 1982-1984=100    M       SA 14-09-21   -0.128544
## 256      Current Index 1982-1984=100    M       SA 14-09-21    0.129396
## 257      Current Index 1982-1984=100    M       SA 14-09-21    0.046579
## 258      Current Index 1982-1984=100    M       SA 14-09-21    0.048202
## 259      Current Index 1982-1984=100    M       SA 14-09-21    0.057561
## 260      Current Index 1982-1984=100    M       SA 14-09-21    0.042301
## 261      Current Index 1982-1984=100    M       SA 14-09-21    0.028400
## 262      Current Index 1982-1984=100    M       SA 14-09-21    0.002417
## 263      Current Index 1982-1984=100    M       SA 14-09-21    0.020074
## 264      Current Index 1982-1984=100    M       SA 14-09-21   -0.067655
## 265      Current Index 1982-1984=100    M       SA 14-09-21   -0.011311
## 266      Current Index 1982-1984=100    M       SA 14-09-21   -0.042129
## 267      Current Index 1982-1984=100    M       SA 14-09-21   -0.041479
## 268      Current Index 1982-1984=100    M       SA 14-09-21   -0.017059
## 269      Current Index 1982-1984=100    M       SA 14-09-21   -0.005385
## 270      Current Index 1982-1984=100    M       SA 14-09-21   -0.014105
## 271      Current Index 1982-1984=100    M       SA 14-09-21    0.016617
## 272      Current Index 1982-1984=100    M       SA 14-09-21   -0.056890
## 273      Current Index 1982-1984=100    M       SA 14-09-21   -0.034458
## 274      Current Index 1982-1984=100    M       SA 14-09-21    0.006305
## 200      Current  Index Dec 1997=100    M       SA 14-09-21   -0.802178
## 201      Current  Index Dec 1997=100    M       SA 14-09-21    0.021442
## 202      Current  Index Dec 1997=100    M       SA 14-09-21    0.012573
## 203      Current  Index Dec 1997=100    M       SA 14-09-21    0.016315
## 204      Current  Index Dec 1997=100    M       SA 14-09-21    0.014313
## 205      Current  Index Dec 1997=100    M       SA 14-09-21    0.011439
## 206      Current  Index Dec 1997=100    M       SA 14-09-21    0.009497
## 207      Current  Index Dec 1997=100    M       SA 14-09-21    0.010436
## 208      Current  Index Dec 1997=100    M       SA 14-09-21    0.011353
## 209      Current  Index Dec 1997=100    M       SA 14-09-21    0.011236
## 210      Current  Index Dec 1997=100    M       SA 14-09-21    0.010214
## 211      Current  Index Dec 1997=100    M       SA 14-09-21    0.010185
## 212      Current  Index Dec 1997=100    M       SA 14-09-21    0.009200
## 213      Current  Index Dec 1997=100    M       SA 14-09-21    0.017383
## 214      Current  Index Dec 1997=100    M       SA 14-09-21    0.010000
## 215      Current  Index Dec 1997=100    M       SA 14-09-21    0.013234
## 216      Current  Index Dec 1997=100    M       SA 14-09-21    0.017209
## 217      Current  Index Dec 1997=100    M       SA 14-09-21    0.020192
## 218      Current  Index Dec 1997=100    M       SA 14-09-21    0.017711
## 219      Current  Index Dec 1997=100    M       SA 14-09-21    0.015697
## 220      Current  Index Dec 1997=100    M       SA 14-09-21    0.011202
## 221      Current  Index Dec 1997=100    M       SA 14-09-21   -0.003510
## 222      Current  Index Dec 1997=100    M       SA 14-09-21   -0.007398
## 223      Current  Index Dec 1997=100    M       SA 14-09-21   -0.000353
## 224      Current  Index Dec 1997=100    M       SA 14-09-21    0.003245
## 225      Current  Index Dec 1997=100    M       SA 14-09-21    0.010397
## 226      Current  Index Dec 1997=100    M       SA 14-09-21    0.013829
## 227      Current  Index Dec 1997=100    M       SA 14-09-21    0.009465
## 228      Current  Index Dec 1997=100    M       SA 14-09-21   -0.002532
## 229      Current  Index Dec 1997=100    M       SA 14-09-21   -0.000606
## 230      Current  Index Dec 1997=100    M       SA 14-09-21    0.006498
## 231      Current  Index Dec 1997=100    M       SA 14-09-21    0.006385
## 232      Current  Index Dec 1997=100    M       SA 14-09-21    0.011593
## 233      Current  Index Dec 1997=100    M       SA 14-09-21    0.004519
## 234      Current  Index Dec 1997=100    M       SA 14-09-21    0.010737
## 235      Current  Index Dec 1997=100    M       SA 14-09-21    0.012720
## 236      Current  Index Dec 1997=100    M       SA 14-09-21    0.016158
## 237      Current  Index Dec 1997=100    M       SA 14-09-21    0.003396
## 238      Current  Index Dec 1997=100    M       SA 14-09-21    0.002922
## 239      Current  Index Dec 1997=100    M       SA 14-09-21    0.014851
## 240      Current  Index Dec 1997=100    M       SA 14-09-21    0.009637
## 241      Current  Index Dec 1997=100    M       SA 14-09-21    0.016195
##                        Category
## 83           Food and Beverages
## 84           Food and Beverages
## 85           Food and Beverages
## 86           Food and Beverages
## 87           Food and Beverages
## 88           Food and Beverages
## 89           Food and Beverages
## 90           Food and Beverages
## 91           Food and Beverages
## 92           Food and Beverages
## 93           Food and Beverages
## 94           Food and Beverages
## 95           Food and Beverages
## 96           Food and Beverages
## 97           Food and Beverages
## 98           Food and Beverages
## 99           Food and Beverages
## 100          Food and Beverages
## 101          Food and Beverages
## 102          Food and Beverages
## 103          Food and Beverages
## 104          Food and Beverages
## 105          Food and Beverages
## 106          Food and Beverages
## 107          Food and Beverages
## 108          Food and Beverages
## 109          Food and Beverages
## 110          Food and Beverages
## 111          Food and Beverages
## 112          Food and Beverages
## 113          Food and Beverages
## 114          Food and Beverages
## 115          Food and Beverages
## 116          Food and Beverages
## 1                       Apparel
## 2                       Apparel
## 3                       Apparel
## 4                       Apparel
## 5                       Apparel
## 6                       Apparel
## 7                       Apparel
## 8                       Apparel
## 9                       Apparel
## 10                      Apparel
## 11                      Apparel
## 12                      Apparel
## 13                      Apparel
## 14                      Apparel
## 15                      Apparel
## 16                      Apparel
## 17                      Apparel
## 18                      Apparel
## 19                      Apparel
## 20                      Apparel
## 21                      Apparel
## 22                      Apparel
## 23                      Apparel
## 24                      Apparel
## 25                      Apparel
## 26                      Apparel
## 27                      Apparel
## 28                      Apparel
## 29                      Apparel
## 30                      Apparel
## 31                      Apparel
## 32                      Apparel
## 33                      Apparel
## 34                      Apparel
## 35                      Apparel
## 36                      Apparel
## 37                      Apparel
## 38                      Apparel
## 39                      Apparel
## 165                Medical Care
## 166                Medical Care
## 167                Medical Care
## 168                Medical Care
## 169                Medical Care
## 170                Medical Care
## 171                Medical Care
## 172                Medical Care
## 173                Medical Care
## 174                Medical Care
## 175                Medical Care
## 176                Medical Care
## 177                Medical Care
## 178                Medical Care
## 179                Medical Care
## 180                Medical Care
## 181                Medical Care
## 182                Medical Care
## 183                Medical Care
## 184                Medical Care
## 185                Medical Care
## 186                Medical Care
## 187                Medical Care
## 188                Medical Care
## 189                Medical Care
## 190                Medical Care
## 191                Medical Care
## 192                Medical Care
## 193                Medical Care
## 194                Medical Care
## 195                Medical Care
## 196                Medical Care
## 197                Medical Care
## 198                Medical Care
## 199                Medical Care
## 117                     Housing
## 118                     Housing
## 119                     Housing
## 120                     Housing
## 121                     Housing
## 122                     Housing
## 123                     Housing
## 124                     Housing
## 125                     Housing
## 126                     Housing
## 127                     Housing
## 128                     Housing
## 129                     Housing
## 130                     Housing
## 131                     Housing
## 132                     Housing
## 133                     Housing
## 134                     Housing
## 135                     Housing
## 136                     Housing
## 137                     Housing
## 138                     Housing
## 139                     Housing
## 140                     Housing
## 141                     Housing
## 142                     Housing
## 143                     Housing
## 144                     Housing
## 145                     Housing
## 146                     Housing
## 147                     Housing
## 148                     Housing
## 149                     Housing
## 150                     Housing
## 151                     Housing
## 152                     Housing
## 153                     Housing
## 154                     Housing
## 155                     Housing
## 156                     Housing
## 157                     Housing
## 158                     Housing
## 159                     Housing
## 160                     Housing
## 161                     Housing
## 162                     Housing
## 163                     Housing
## 164                     Housing
## 40  Education and Communication
## 41  Education and Communication
## 42  Education and Communication
## 43  Education and Communication
## 44  Education and Communication
## 45  Education and Communication
## 46  Education and Communication
## 47  Education and Communication
## 48  Education and Communication
## 49  Education and Communication
## 50  Education and Communication
## 51  Education and Communication
## 52  Education and Communication
## 53  Education and Communication
## 54  Education and Communication
## 55  Education and Communication
## 56  Education and Communication
## 57  Education and Communication
## 58  Education and Communication
## 59  Education and Communication
## 60  Education and Communication
## 61  Education and Communication
## 62  Education and Communication
## 63  Education and Communication
## 64  Education and Communication
## 65  Education and Communication
## 66  Education and Communication
## 67  Education and Communication
## 68  Education and Communication
## 69  Education and Communication
## 70  Education and Communication
## 71  Education and Communication
## 72  Education and Communication
## 73  Education and Communication
## 74  Education and Communication
## 75  Education and Communication
## 76  Education and Communication
## 77  Education and Communication
## 78  Education and Communication
## 79  Education and Communication
## 80  Education and Communication
## 81  Education and Communication
## 82  Education and Communication
## 242              Transportation
## 243              Transportation
## 244              Transportation
## 245              Transportation
## 246              Transportation
## 247              Transportation
## 248              Transportation
## 249              Transportation
## 250              Transportation
## 251              Transportation
## 252              Transportation
## 253              Transportation
## 254              Transportation
## 255              Transportation
## 256              Transportation
## 257              Transportation
## 258              Transportation
## 259              Transportation
## 260              Transportation
## 261              Transportation
## 262              Transportation
## 263              Transportation
## 264              Transportation
## 265              Transportation
## 266              Transportation
## 267              Transportation
## 268              Transportation
## 269              Transportation
## 270              Transportation
## 271              Transportation
## 272              Transportation
## 273              Transportation
## 274              Transportation
## 200                  Recreation
## 201                  Recreation
## 202                  Recreation
## 203                  Recreation
## 204                  Recreation
## 205                  Recreation
## 206                  Recreation
## 207                  Recreation
## 208                  Recreation
## 209                  Recreation
## 210                  Recreation
## 211                  Recreation
## 212                  Recreation
## 213                  Recreation
## 214                  Recreation
## 215                  Recreation
## 216                  Recreation
## 217                  Recreation
## 218                  Recreation
## 219                  Recreation
## 220                  Recreation
## 221                  Recreation
## 222                  Recreation
## 223                  Recreation
## 224                  Recreation
## 225                  Recreation
## 226                  Recreation
## 227                  Recreation
## 228                  Recreation
## 229                  Recreation
## 230                  Recreation
## 231                  Recreation
## 232                  Recreation
## 233                  Recreation
## 234                  Recreation
## 235                  Recreation
## 236                  Recreation
## 237                  Recreation
## 238                  Recreation
## 239                  Recreation
## 240                  Recreation
## 241                  Recreation

6 Deliverables

As usual, there is a lot of explanatory text, comments, etc. You do not need these, so delete them and produce a stand-alone document that you could share with someone. Knit the edited and completed R Markdown file as an HTML document (use the “Knit” button at the top of the script editor window) and upload it to Canvas.

7 Details

  • Who did you collaborate with: Philippine Bonnaud, Ieuan Edmonds, Maoze Li, Yuzhou Li, Francesco Sartori and Sanskriti Bajaj
  • Approximately how much time did you spend on this problem set: 5 hours
  • What, if anything, gave you the most trouble: challenge 2 csv

Please seek out help when you need it, and remember the 15-minute rule. You know enough R (and have enough examples of code from class and your readings) to be able to do this. If you get stuck, ask for help from others, post a question on Slack– and remember that I am here to help too!

As a true test to yourself, do you understand the code you submitted and are you able to explain it to someone else?

8 Rubric

Check minus (1/5): Displays minimal effort. Doesn’t complete all components. Code is poorly written and not documented. Uses the same type of plot for each graph, or doesn’t use plots appropriate for the variables being analyzed.

Check (3/5): Solid effort. Hits all the elements. No clear mistakes. Easy to follow (both the code and the output).

Check plus (5/5): Finished all components of the assignment correctly and addressed both challenges. Code is well-documented (both self-documented and with additional comments as necessary). Used tidyverse, instead of base R. Graphs and tables are properly labelled. Analysis is clear and easy to follow, either because graphs are labeled clearly or you’ve written additional text to describe how you interpret the output.